from common.base import Base
from .locator.login_loc import *
from helium import *


class LoginPage(Base):

    def login(self, username, password):
        self.click_button(home_login_btn, desc='点击首页登录按钮')
        highlight(S(username_input[1]))
        self.input_text(username, username_input, desc='输入用户邮箱')
        highlight(S(password_input[1]))
        self.input_text(password, password_input, desc='输入密码')
        highlight(S(login_btn[1]))
        self.click_button(login_btn, desc='登录')
